package top.yxqz.spring.ioc.pojo;

/**
 * @author: 余小小
 * @date: 2023/4/6
 * @description：小猫类
 */
public class Cat {
    private String catName;//猫咪名字
    private Integer age;//猫咪年龄
    private Animal animal;//动物属性

    public Cat() {
    }

    public Cat(String catName, Integer age, Animal animal) {
        this.catName = catName;
        this.age = age;
        this.animal = animal;
    }

    /**
     * 获取
     *
     * @return catName
     */
    public String getCatName() {
        return catName;
    }

    /**
     * 设置
     *
     * @param catName
     */
    public void setCatName(String catName) {
        this.catName = catName;
    }

    /**
     * 获取
     *
     * @return age
     */
    public Integer getAge() {
        return age;
    }

    /**
     * 设置
     *
     * @param age
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * 获取
     *
     * @return animal
     */
    public Animal getAnimal() {
        return animal;
    }

    /**
     * 设置
     *
     * @param animal
     */
    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public String toString() {
        return "Cat{catName = " + catName + ", age = " + age + ", animal = " + animal + "}";
    }
}
